#ifndef ORDERSECTIONMODEL_H
#define ORDERSECTIONMODEL_H

#include "standard-database-model.h"

class ContractorDelegate;
class WorkerDelegate;

class OrderSectionModel : public StandardDatabaseModel
{
    Q_OBJECT
public:
    explicit OrderSectionModel(QObject *parent = 0);

    enum OrderSectionColumns
    {
        WorkerColumn,
        ContractorColumn,
        DateColumn,
        SumColumn
    };

    ValueResult *canSetField(QVariant value, int column, int row);

public slots:
    void initialize();

private slots:
    void finishInitialize();
    void setupInternalModel();

private:
    WorkerDelegate* m_workerDelegate;
    ContractorDelegate* m_contractorDelegate;
};

#endif // ORDERSECTIONMODEL_H
